<?php
class Pageley_Query_Condition_Not implements Pageley_Query_Condition {
	private $condition;

	public function __construct($condition) {
		$this->condition = $condition;
	}

	public function matches($entity) {
		return !$this->condition->matches($entity);
	}

	public function getCondition() {
		return $this->condition;
	}

	public function setCondition($condition) {
		$this->condition = $condition;
	}

	public function getValues() {
		return $this->condition->getValues();
	}

	public function setQuery($query) {
		$this->condition->setQuery($query);
	}

	public function __toString() {
		return "not " . $this->condition;
	}
}